import { request } from 'umi';

export async function getArticle(params: any) {
  return request('/api/client/getArticle', {
    method: 'GET',
    params,
  });
}
export async function savePageView(params: any) {
  return request('/api/analyse/savePageView', {
    method: 'POST',
    data: params,
  });
}

export async function articleLiked(params: any) {
  return request('/api/analyse/saveLiked', {
    method: 'POST',
    data: params,
  });
}

export async function getOneArticleLiked(params: any) {
  return request('/api/analyse/getOneArticleLiked', {
    method: 'GET',
    params,
  });
}

export async function saveCollect(params: any) {
  return request('/api/analyse/saveCollect', {
    method: 'POST',
    data:params,
  });
}

export async function getArticleCollect(params: any) {
  return request('/api/analyse/getArticleCollect', {
    method: 'GET',
    params,
  });
}

export async function cancelArticleCollect(params: any) {
  return request('/api/analyse/cancelArticleCollect', {
    method: 'POST',
    data:params,
  });
}

export async function getDateArticlePv(params: any) {
  return request('/api/analyse/getDateArticlePv', {
    method: 'GET',
    params,
  });
}